* { box-sizing: border-box; }

%whole-container {
  width: 100%;
  height: 100%;
}

%center-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

html, body {
  @extend %whole-container;
  @extend %center-content;
  margin: 0;
}

#example {
  flex-grow: 1;
  height: 100%;
}

@media (min-width: 600px) {
  #example {
    flex-grow: unset;
    width: 600px;
    height: 500px;
  }
}

// PoseNet styling
.PoseNet {
  @extend %whole-container;
  @extend %center-content;

  &__loading {
    position: absolute;
    font-family: 'Open Sans';
  	font-size: 2em;
  }

  video {
    -moz-transform: scaleX(-1);
    -o-transform: scaleX(-1);
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    display: none;
  }
}

// Animated gradient background
@-webkit-keyframes Gradient {
	0% {
		background-position: 0% 50%
	}
	50% {
		background-position: 100% 50%
	}
	100% {
		background-position: 0% 50%
	}
}

@-moz-keyframes Gradient {
	0% {
		background-position: 0% 50%
	}
	50% {
		background-position: 100% 50%
	}
	100% {
		background-position: 0% 50%
	}
}

@keyframes Gradient {
	0% {
		background-position: 0% 50%
	}
	50% {
		background-position: 100% 50%
	}
	100% {
		background-position: 0% 50%
	}
}

body {
	color: #fff;
	background: linear-gradient(-45deg, #EE7752, #E73C7E, #23A6D5, #23D5AB);
	background-size: 400% 400%;
	-webkit-animation: Gradient 15s ease infinite;
	-moz-animation: Gradient 15s ease infinite;
	animation: Gradient 15s ease infinite;
}

// Television
.tv {
	@extend %whole-container;
	border: 10px solid #333;
	border-radius: 15px;
	background-clip: border-box;
	position: relative;
	background: #000;

	&:after, &:before {
		position: absolute;
		content: "";
		background: #333;
	}

	&:after {
		width: 40px; height:50px;
		bottom: -50px; left:50%;
		margin-left: -20px;
	}

	&:before {
		width: 130px; height:10px;
		bottom: -50px; left:50%;
		margin-left: -65px;
		border-top-right-radius: 10px;
		border-top-left-radius: 10px;
	}

  &-inner {
    @extend %whole-container;
  	overflow: hidden;
  	position: relative;
  }
}
